<template>
  <div>
    <van-button type="primary" @click="getUser">主要按钮</van-button>
    <van-button type="success">成功按钮</van-button>
    <van-button type="default">默认按钮</van-button>
    <van-button type="warning">警告按钮</van-button>
    <van-button type="danger">危险按钮</van-button>
  </div>

  <div>
    展示 pinia的数据
    {{ userStore.msg }}----{{ userStore.count }}

    {{ userStore.tel }}----{{ userStore.dubleCount }}

    <button @click="click">点击</button>
  </div>
</template>

<script setup lang="ts">
import { useUserStore } from '@/store/userStore'

// test 测试代码
import { getLogin } from '@/apis/user'

const getUser = async () => {
  let res = await getLogin({ loginname: 'admin1', password: '123456' })
  console.log(res)
}

//  测试 pinia

const userStore = useUserStore()

console.log(userStore.msg)
console.log(userStore.count)

console.log(userStore.dubleCount)

const click = () => {
  userStore.setTel(1000)
}
</script>

<style scoped></style>
